package chapter10Daemon;

/**
 * 非守护线程
 * Created by LinGer on 2019/6/19
 */
public class NotDaemonTest extends Thread {

    public NotDaemonTest(String name){
        super(name);
    }

    @Override
    public void run() {
        try{
            for (int i = 0; i < 5; i++) {
                Thread.sleep(100);
                System.out.println(this.getName() + " is daemon? " + this.isDaemon() + " ,loop " + i);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
